package com.tjsiqi.dao;

import com.tjsiqi.beans.PageQuery;
import com.tjsiqi.model.SysUser;
import com.tjsiqi.param.SearchUserNameParam;
import com.tjsiqi.param.SearchUserParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    SysUser findByKeyword(@Param("keyword") String keyword);

    int countByMail(@Param("mail") String mail, @Param("id") Integer id);

    int countByTelephone(@Param("telephone") String telephone, @Param("id") Integer id);

    int countByDeptId(@Param("deptId") int deptId);

    List<SysUser> getPageByDeptId(@Param("deptId") int deptId, @Param("page") PageQuery page);

    List<SysUser> getByIdList(@Param("idList") List<Integer> idList);

    List<SysUser> getAll();

    int countByname(@Param("searchUParam") SearchUserParam searchUserParam);

    List<SysUser> getPageByname(@Param("searchUParam") SearchUserParam searchUserParam, @Param("page") PageQuery page);

    int countByUsername(@Param("searchUserNameParam") SearchUserNameParam searchUserNameParam);

    List<SysUser> getPageByUsername(@Param("searchUserNameParam") SearchUserNameParam searchUserNameParam, @Param("page") PageQuery page);

    int checkPhoneNum(@Param("phoneNum") String phoneNum);

    int checkMail(@Param("mail") String mail);

    int checkjbzCode(@Param("jbzCode") String jbzCode);

    SysUser getUserInfo(@Param("jbzCode") String jbzCode, @Param("userId") int userId);

    int getNewUserCount(@Param("status") int status);
}